package com.retrofit.rxjava;

import com.google.gson.JsonObject;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface MovieService {

    //获取豆瓣Top250 榜单
    @GET("top250")
    Observable<MovieSubject> getTop250(@Query("start") int start, @Query("count") int count);

    @FormUrlEncoded
    @POST("/x3/weather")
    Call<String> getWeather(@Field("cityId") String cityId, @Field("key") String key);

    //获取豆瓣Top250 榜单
    //@GET("top250")
    //Call<MovieSubject> getTop250 (@Query("start") int start , @Query("count") int count);

    //返回的Json
    //获取豆瓣Top250 榜单
//    @GET("top250")
//    Call<JsonObject> getTop250 (@Query("start") int start , @Query("count") int count);

//    @FormUrlEncoded
//    @POST("top250")
//    Call<MovieSubject> getTop250 (@Field("start") int start , @Field("count") int count);
}
